package io.github.wslxm.springbootplus2.manage.sys.model.dto;

import io.github.wslxm.springbootplus2.core.base.model.Convert;
import io.github.wslxm.springbootplus2.core.utils.validated.XjRegUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Pattern;


/**
 * 权限接口表
 * <p>
 *  ::本代码由[兮家小二]提供的代码生成器生成,如有问题,请手动修改 ::作者CSDN:https://blog.csdn.net/qq_41463655
 * </p>
 * @author wangsong
 * @email 1720696548@qq.com
 * @date 2020-08-22 13:25:02
 */
@Data
@ToString(callSuper = true)
@ApiModel(value = "SysAuthorityDTO 对象", description = "权限接口表")
public class SysAuthorityDTO extends Convert {

    private static final long serialVersionUID = 0L;

    @ApiModelProperty(notes = "权限类Id(方法与类/层级关系展示)")
    @Length(min = 0, max = 32,message = "sys.authority.pid.Length")
    private String pid;

    @ApiModelProperty(notes = "请求方式(GET/POST/PUT/DELETE)")
    @Length(min = 0, max = 32,message = "sys.authority.method.Length")
    private String method;

    @ApiModelProperty(notes = "权限url")
    @Length(min = 0, max = 128,message = "sys.authority.url.Length")
    @Pattern(regexp = XjRegUtil.URL, message = XjRegUtil.URL_MSG)
    private String url;

    @ApiModelProperty(notes = "权限备注信息")
    @Length(min = 0, max = 128,message = "sys.authority.desc.Length")
    private String desc;

    @ApiModelProperty(notes = "禁用(0-否 1-是)")
    @Range(min = 0, max = 9L,message = "sys.authority.disable.Range")
    private Integer disable;

    @ApiModelProperty(notes = "终端(字典code, 如 0-管理端 1-用户端)")
    @Range(min = 0, max = 9L,message = "sys.authority.type.Range")
    private Integer type;

    @ApiModelProperty(notes = "授权状态(字典code  0-无需登录 1-需登录 2-需登录+授权)")
    @Range(min = 0, max = 9L,message = "sys.authority.state.Range")
    private Integer state;

    @ApiModelProperty(notes = "是否需要验签")
    private Boolean isSign;

}
